Skip to main content

All Questions

13votes
8answers
6kviews

How do compilers work in a language that doesn't allow recursion?

I'm recently learning the programming language, and I wonder how compilers work when the language itself does not allow recursion, like how the compiler or the runtime checkers makes sure that there ...
csxyyyyy's user avatar
-2votes
4answers
247views

Block structured iteration and recursion

Programming languages traditionally have blocks that specifically cater to controlling iteration. There is the simple while-loop: while (i < 3) {...}; Then there is the more complicated for-loop: ...
Steve's user avatar
  • 12.2k
3votes
1answer
188views

Choosing the design of a scientific DSL: purely or impurely functional?

My aim is to create a language specific to the scientific field (which would be used mainly in the field of machine learning and physics) which would be based on the functional paradigm, a paradigm ...
Foxy's user avatar
  • 621
3votes
3answers
236views

Precisely define "what to solve" and "how to solve" corollary in functional and imperative programming respectively

I am not sure if I ever clearly understood standard corollary "what to solve" and "how to solve" used to point out difference between functional (declarative) and imperative programming paradigm ...
rahulaga-msft's user avatar
-1votes
1answer
155views

Reactive programming language [closed]

I had been using react-js and really like its concept so I want to know if there is a programming language/framework that sort of works like it. For instance, I want to define: var A = something var ...
letFunny's user avatar
5votes
3answers
2kviews

In functional programming, what it means "Order of evaluation does not matter" when function is pure?

In context of pure functions in FP, apart from several benefits mentioned like easy to reason about, testability it also says "order of evaluation does not matter" since output remains same for given ...
rahulaga-msft's user avatar
54votes
11answers
12kviews

"Easy to reason about" - what does that mean? [closed]

I have heard a lot of times when other developers use that phrase to "advertise" some patterns or developing best practices. Most of the time this phrase is used when you are talking about benefits of ...
Fabio's user avatar
  • 3,166
2votes
2answers
416views

Strategy for implementing Multiple Dispatch

This is a question regarding how Multiple Dispatch works. Suppose that we have a type hierarchy like this: Drawable -> Shape -> Polygon -> Rectangle And there are three functions (This is ...
Mahdi's user avatar
1vote
1answer
180views

What is the connection between type inference and advanced type systems?

I don't understand the connection between type inference and advanced type systems. I don't see why Haskell or Standard ML or OCaml could not have existed without type inference. My only guess is that ...
eatonphil's user avatar
17votes
6answers
4kviews

A language based on limiting amount of arguments passed to functions

The idea is inspired by the fact operators such as +, -,%, etc. can be seen as functions with either one or two arguments passed, and no side-effects. Assuming I, or someone else, writes a language ...
user avatar
7votes
2answers
2kviews

Why does Scala name monadic composition as "for comprehension"?

Not sure if it's an appropriate question, but here it goes. I know Haskell's do notation pretty well. And I realized that Scala's "for comprehension" really is just mostly the same as do notation in ...
xji's user avatar
  • 791
-2votes
1answer
753views

How do I create my own Objective-C to Swift converter? [closed]

I'm really interested in writing my own converter. I know C++/Python/Objective-C/Swift and a little Haskell. There are website like objectivec2swift and iswift.org, which can convert OC to Swift ...
Tiper's user avatar
11votes
2answers
2kviews

Functional programming, compared to the process of a computer [duplicate]

In functional programming, it is considered bad practice (at least from my observations) to use state changes. Since computers operate in an imperative-language-like matter (performing one operation ...
sneelhorses's user avatar
4votes
2answers
183views

Functional Programming - Functions defining specific evaluation of functions passed to it for optimization

Firstmost, I am just getting started with functional programming so I would appreciate corrections in any terminology I may have used incorrectly. Story time, While doing a Project Euler Problem 1 in ...
Fabián Heredia Montiel's user avatar
3votes
1answer
1kviews

What aspects of Haskell led to its rise in popularity among experts?

20 years ago, the Functional Programming world was all about Lisp and Scheme. When I went to college in 2001, my Fall Semester Freshman CS 101 course was taught in OCaml. However, these days the ...
durron597's user avatar

153050per page
close